<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>	Mixins 混入选项操作</title>
	<script type="text/javascript" src="../assets/js/vue.js"></script>
</head>
<body>
	<h1>Mixins 混入选项操作</h1>
	<hr>
	<div id="app">
        <p>今日温度： {{wendu}} 度</p>
        <p>今日穿衣： {{chuanyi}}</p>
        <div>
			<button @click="addwen">升高温度</button>
        </div>

	</div>
	<header></header>
    

</body>
<script type="text/javascript">
var addCon = {
	updated:function () {
		console.log('shujv'+this.wendu);
	}
}
// 全局混入
Vue.mixin({
	updated:function () {
		console.log('全局');
	}
})
var app = new Vue({
	el:'#app',
	data:{
		wendu:14,
		chuanyi:'夹克长裙'
	},
	methods:{
		addwen:function () {
			this.wendu+=5;
		}
	},
	updated:function () {
		console.log('原生');
	},
	mixins:[addCon]
})

</script>
</html>